x86: Use 64-bit arithmetic in reserve_in_boot_e820().
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Jun 2007 14:08:32 +0000 (15:08 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 20 Jun 2007 14:08:32 +0000 (15:08 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/setup.c

index 129621a4cad467562d35fb4ea8b6f4278a3b5d97..23e216ac44e27a40885a2bda723ba7486e514f09 100644 (file)
@@ -295,14 +295,14 @@ static struct e820map __initdata boot_e820;
 /* Reserve area (@s,@e) in the temporary bootstrap e820 map. */
 static void __init reserve_in_boot_e820(unsigned long s, unsigned long e)
 {
-    unsigned long rs, re;
+    uint64_t rs, re;
     int i;
 
     for ( i = 0; i < boot_e820.nr_map; i++ )
     {
         /* Have we found the e820 region that includes the specified range? */
         rs = boot_e820.map[i].addr;
-        re = boot_e820.map[i].addr + boot_e820.map[i].size;
+        re = rs + boot_e820.map[i].size;
         if ( (s < rs) || (e > re) )
             continue;